using Assets.Scripts.SO;
using UnityEngine;

namespace Assets.Scripts.Entities
{
    internal class TrampolineLimits : MonoBehaviour
    {
        [SerializeField] private ScriptableUpgrade _upgrade;

        public void UpdateState()
        {
            var name = _upgrade.Value.ToString();
            foreach (Transform item in transform)
            {
                item.gameObject.SetActive(item.name == name);
            }
        }

        private void Start()
        {
            UpdateState();
        }
    }
}
